<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
 
function smarty_block_cosmo_link($params, $content, &$smarty){
	// check parameters
	if(!isset($params['controller'])) 
		return '';
	if(isset($params['method'])) {
		$method = $params['method'] ;
	} else {
		$method = null ;
	}
	
	if(isset($params['data'])) {
		$data = $params['data'] ;
	} else {
		$data = null ;
	}
	
	$loader = Loader::getInstance() ;
	$loader->helper('html') ;
	
	return make_link(strtolower($params['controller']), $content, $method, $data);	
}

?>